JSMeter: Characterizing Real-World Behavior of JavaScript Programs
نویسندگان
چکیده
JavaScript is widely used in web-based applications and is increasing popular with developers. So-called ”browser wars” in recent years have focused on JavaScript performance, specifically claiming comparative results based on benchmark suites such as SunSpider and V8. In this paper we evaluate the behavior of JavaScript web applications from commercial websites and compare this behavior with the benchmarks. We measure three specific areas of JavaScript runtime behavior: 1) functions and code; 2) heap-allocated objects and data; 3) events and handlers. We find that the benchmarks are not representative of many real websites and that conclusions reached from measuring the benchmarks may be misleading. Specific examples of such misleading conclusions include the following: that web applications have many loops, that non-string objects in web applications are extremely short-lived, and that web applications handle few events. We hope our results will convince the JavaScript community to develop and adopt benchmarks that are more representative of real web applications. To reduce the total length of the paper, we have chosen to shrink our figures substantially, and we recommend that an interested reader view the document in color, preferably with the ability to enlarge the figures as needed. Our intent of including this much raw data is to allow interested readers an opportunity to draw their own conclusions.
منابع مشابه
JSMeter: Measuring JavaScript Behavior in the Wild
JavaScript is widely used in web-based applications and is increasing popular with developers. So-called browser wars in recent years have focused on JavaScript performance, specifically claiming comparative results based on benchmark suites such as SunSpider and V8. In this paper we evaluate the behavior of JavaScript web applications from commercial web sites and compare this behavior with th...
متن کاملJSMeter: Comparing the Behavior of JavaScript Benchmarks with Real Web Applications
JavaScript is widely used in web-based applications and is increasingly popular with developers. So-called browser wars in recent years have focused on JavaScript performance, specifically claiming comparative results based on benchmark suites such as SunSpider and V8. In this paper we evaluate the behavior of JavaScript web applications from commercial web sites and compare this behavior with ...
متن کاملThe Good, the Bad, and the Ugly: An Empirical Study of Implicit Type Conversions in JavaScript
Most popular programming languages support situations where a value of one type is converted into a value of another type without any explicit cast. Such implicit type conversions, or type coercions, are a highly controversial language feature. Proponents argue that type coercions enable writing concise code. Opponents argue that type coercions are error-prone and that they reduce the understan...
متن کاملAn Execution-flow Based Method for Detecting Cross-Site Scripting of Ajax Applications
We present an execution-flow analysis for JavaScript programs running in a web browser to prevent Cross-site Scripting (XSS) attacks. We construct finite-state automata (FSA) to model the client-side behavior of Ajax applications under normal execution. Our system is deployed in proxy mode. The proxy analyzes the execution flow of client-side JavaScript before the requested web pages arrive at ...
متن کاملReal-World Loops are Easy to Predict: A Case Study
In this paper we study the relevance of fast and simple solutions to compute approximations of the number of iterations of loops (loop trip count) of imperative real-world programs. The context of this work is the use of these approximations in compiler optimizations: most of the time, the optimizations yield greater benefits for large trip counts, and are either innocuous or detrimental for sm...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009